bitkeeper revision 1.506 (3f88167eEXnAd-cmzFGwEPmqdJEKDg)
authorkaf24@scramble.cl.cam.ac.uk <kaf24@scramble.cl.cam.ac.uk>
Sat, 11 Oct 2003 14:41:02 +0000 (14:41 +0000)
committerkaf24@scramble.cl.cam.ac.uk <kaf24@scramble.cl.cam.ac.uk>
Sat, 11 Oct 2003 14:41:02 +0000 (14:41 +0000)
xl_block.c:
  Remove bogus permission checks from xlblk ioctl.

xenolinux-2.4.22-sparse/arch/xeno/drivers/block/xl_block.c

index 12e3657d6ae7931b8136f1a6ca8f8026bf626b85..357c2056a601625c249dd9ee56ae096e474d13e3 100644 (file)
@@ -152,11 +152,6 @@ int xenolinux_block_release(struct inode *inode, struct file *filep)
     return 0;
 }
 
-/*
- * handle ioctl calls
- *
- * individual ioctls are defined in /usr/include/linux/fs.h
- */
 
 int xenolinux_block_ioctl(struct inode *inode, struct file *filep,
                          unsigned command, unsigned long argument)
@@ -165,13 +160,9 @@ int xenolinux_block_ioctl(struct inode *inode, struct file *filep,
     struct hd_geometry *geo = (struct hd_geometry *)argument;
     struct gendisk *gd;     
     struct hd_struct *part; 
-    
-    DPRINTK("xenolinux_block_ioctl\n"); 
-
-    /* check permissions */
-    if (!capable(CAP_SYS_ADMIN)) return -EPERM;
-    if (!inode)                  return -EINVAL;
 
+    /* NB. No need to check permissions. That is done for us. */
+    
     DPRINTK_IOCTL("command: 0x%x, argument: 0x%lx, dev: 0x%04x\n",
                   command, (long) argument, dev); 
   
@@ -248,7 +239,7 @@ int xenolinux_block_ioctl(struct inode *inode, struct file *filep,
        return 0;
 
     case CDROMMULTISESSION:
-        printk("FIXME: support multisession CDs later\n");
+        DPRINTK("FIXME: support multisession CDs later\n");
         memset((struct cdrom_multisession *)argument, 0, 
                sizeof(struct cdrom_multisession));
         return 0;